import Cookies from 'js-cookie'


const PREFIX = import.meta.env.VITE_COOKIE_PREFIX
export default {
    get: key => Cookies.get(PREFIX + key),
    set: (key, value, options = {}) => {
        options.expires ??= 365 // 1 year by default
        Cookies.set(PREFIX + key, value, options)
    },
    remove: key => Cookies.remove(PREFIX + key)
}
